<template>
    <div >展示名称{{name}}</div>
    <el-button type="primary" @click="changeName">改变name</el-button>
    <el-button type="primary" >改变颜色</el-button>
</template>

<script>
 import { reactive,ref,toRef} from 'vue'
 export default {
    name:'Test2',

    setup(){
       let namex = ref('张三2');
        return{
            name:namex
        }
    },
    methods:{
        changeName(){
            alert(222222);
            this.name = "李四"
        }
    }
 }
</script>